<template>
  <div class="left-container">
    <h2>Left组件</h2>
    <button @click="getbooks">发起axios请求</button>
  </div>
</template>

<script>
// import axios from 'axios'
export default {
  methods: {
    getbooks() {
      this.$http({
        method: 'get',
        url: '/api/get'
      }).then(function(res) {
        console.log(res.data)
      })
    }
  }
}
</script>

<style lang="less" scoped>
  .left-container{
    background-color: aqua;
    min-height: 200px;
    color: white;
    flex: 1;
  }
</style>
